package common.util.web;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * 
 * @Description:数据输出工具类
 * @author wangxin
 */
public class AjaxUtils {
	
	public static void write(HttpServletResponse response, String message)
			throws IOException {
		response.setContentType("text/html; charset=utf-8");
		PrintWriter out = response.getWriter();
		out.println(message);
		out.flush();
		out.close();
	}

	public static void write(HttpServletResponse response, int message)
			throws IOException {
		response.setContentType("text/html; charset=utf-8");
		PrintWriter out = response.getWriter();
		out.println(message);
		out.flush();
		out.close();
	}
}
